<?php


namespace app\api\model;


use OAuth2\Storage\Pdo;

class OAuthPdo extends Pdo
{
    public function __construct($connection, $config = array())
    {
        parent::__construct($connection, $config);

        $user_table = config('database.oauth_user_table');

        if ($user_table) {
            $this->config['user_table'] = $user_table;
        }
    }

    public function hashPassword($password)
    {
        return parent::hashPassword($password); // TODO: 如果有自己的加密规则，重写此方法
    }

    public function checkPassword($user, $password)
    {
        return parent::checkPassword($user, $password); // TODO: 如果有自己的加密规则，重写此方法
    }

}